webhook: add test for https in test_webhook_delivery.py and fix the failure#11132
webhook: add test for https in test_webhook_delivery.py and fix the failure#11132weizhouapache wants to merge 1 commit intoapache:4.20from
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11132 +/- ##
=========================================
Coverage 16.15% 16.15%
- Complexity 13274 13278 +4
=========================================
Files 5657 5657
Lines 497898 497969 +71
Branches 60374 60388 +14
=========================================
+ Hits 80441 80464 +23
- Misses 408496 408541 +45
- Partials 8961 8964 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14035 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13686)
|
|
@shwstppr |
|
@weizhouapache I'm not entirely sure about these changes (we discussed this earlier!?). However, with the current change, it seems we're using a "trust all" approach even when sslverification is set to true. In my understanding, the correct way to test this would be to set up a server using self-signed certificates, explicitly add those certificates to the trusted store on the management server, and then verify that delivery works as expected when sslverification is set to true. |
@shwstppr thanks for the reply. |
|
@weizhouapache upto you. Without any change in Java code I feel the new test would fail because it is using a self-signed certificate and SSL verification is set to true. For the test or a user's use-case sslverification can be set to false which should allow delivery to work fine. |
Thanks @shwstppr I understand a bit on your logic now.
I think the logic is correct. Maybe one thing can be improved is, adding the cloudstack mangement store to trust store, so the https server which uses the certificate issued by cloudstack CA, such as the https server in the new test, can work. I will update the PR (java code) so the logic will be kept, and new test with https server will pass too. |
|
Thanks @weizhouapache. Make sense. Using something similar to what you've used in #11113 and then in the test, either using some existing certificate from MS or using |
|
closing now |
Description
This PR
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?